﻿/**
 * 
 * @file   FITKAbaConstraintTie.h
 * @brief  相互作用绑定约束
 * @author LiJin (1003680421@qq.com)
 * @date   2024-04-17
 * 
 */
#ifndef FITKABACONSTRAINTTIE_H
#define FITKABACONSTRAINTTIE_H
#include "FITKAbaAbstractConstraint.h"


namespace Interface {

    /**
     * @brief  绑定约束类
     * @author LiJin (1003680421@qq.com)
     * @date   2024-04-17
     */
    class FITKInterfaceStructuralAPI FITKAbaConstraintTie: public FITKAbaAbstractConstraint
    {
        Q_OBJECT
        FITKCLASS(Interface, FITKAbaConstraintTie)
    public:
        /**
         * @brief  离散方法
         * @author LiJin (1003680421@qq.com)
         * @date   2024-04-17
         */
        enum DiscretizationMethod
        {
            AnalysisDefault,
            NodeToSurface,
            SurfaceToSurface
        };
        Q_ENUM(DiscretizationMethod);
        /**
         * @brief  位置容差
         * @author LiJin (1003680421@qq.com)
         * @date   2024-04-17
         */
        enum PositionTolerance
        {
            UseComputerDefault,
            SpecifyDistance
        };
        Q_ENUM(PositionTolerance);
        /**
         * @brief  约束比
         * @author LiJin (1003680421@qq.com)
         * @date   2024-04-17
         */
        enum ConstraintRatio
        {
            UseAnalysisDefault,
            SpecifyValue
        };
        Q_ENUM(ConstraintRatio);
    
    public:
        /**
         * @brief  构造函数
         * @author LiJin (1003680421@qq.com)
         * @date   2024-04-28
         */
        FITKAbaConstraintTie() = default;
        /**
         * @brief  析构函数
         * @param[in]  
         * @return 
         * @author LiJin (1003680421@qq.com)
         * @date   2024-04-28
         */
        ~FITKAbaConstraintTie() = default;
        /**
         * @brief  获取约束类型
         * @param[in]  
         * @return 
         * @author LiJin (1003680421@qq.com)
         * @date   2024-04-28
         */
        FITKAbaConstraintType getConstraintType() const override;
        /**
         * @brief  数据拷贝
         * @param[in]  
         * @return 
         * @author LiJin (1003680421@qq.com)
         * @date   2024-04-28
         */
        bool copy(Core::FITKAbstractDataObject* obj) override;
        /**
         * @brief  获取离散方法
         * @param[in]  
         * @return 
         * @author LiJin (1003680421@qq.com)
         * @date   2024-04-17
         */
        DiscretizationMethod getDiscretizationMethod() const;
        /**
         * @brief  设置离散方法
         * @param[in]  
         * @return 
         * @author LiJin (1003680421@qq.com)
         * @date   2024-04-17
         */
        void setDiscretizationMethod(DiscretizationMethod newDiscretizationMethod);
        /**
         * @brief  排除壳单元厚度
         * @param[in]  
         * @return 
         * @author LiJin (1003680421@qq.com)
         * @date   2024-04-17
         */
        bool getExcludeShellThickness() const;
        /**
         * @brief  设置排除壳单元厚度
         * @param[in]  
         * @return 
         * @author LiJin (1003680421@qq.com)
         * @date   2024-04-17
         */
        void setExcludeShellThickness(bool newExcludeShellThickness);
        /**
         * @brief  位置容差类型
         * @param[in]  
         * @return 
         * @author LiJin (1003680421@qq.com)
         * @date   2024-04-17
         */
        PositionTolerance getPostionTolerance() const;
        /**
         * @brief  设置位置容差类型
         * @param[in]  
         * @return 
         * @author LiJin (1003680421@qq.com)
         * @date   2024-04-17
         */
        void setPostionTol(PositionTolerance newPostionTol);
        /**
         * @brief  获取位置容差
         * @param[in]  
         * @return 
         * @author LiJin (1003680421@qq.com)
         * @date   2024-04-17
         */
        double getPositionDistance() const;
        /**
         * @brief  设置位置容差
         * @param[in]  
         * @return 
         * @author LiJin (1003680421@qq.com)
         * @date   2024-04-17
         */
        void setPositionDistance(double newPositionDistance);
        /**
         * @brief  是否调整从面节点
         * @param[in]  
         * @return 
         * @author LiJin (1003680421@qq.com)
         * @date   2024-04-17
         */
        bool getAdjustSlave() const;
        /**
         * @brief  设置是否调整从面节点
         * @param[in]  
         * @return 
         * @author LiJin (1003680421@qq.com)
         * @date   2024-04-17
         */
        void setAdjustSlave(bool newAdjustSlave);
        /**
         * @brief  是否绑定旋转自由度
         * @param[in]  
         * @return 
         * @author LiJin (1003680421@qq.com)
         * @date   2024-04-17
         */
        bool getTieRotationDofs() const;
        /**
         * @brief  设置是否绑定旋转自由度
         * @param[in]  
         * @return 
         * @author LiJin (1003680421@qq.com)
         * @date   2024-04-17
         */
        void setTieRotationDofs(bool newTieRotationDofs);
        /**
         * @brief  约束比例类型
         * @param[in]  
         * @return 
         * @author LiJin (1003680421@qq.com)
         * @date   2024-04-17
         */
        ConstraintRatio getConstraintRatio() const;
        /**
         * @brief  设置约束比例类型
         * @param[in]  
         * @return 
         * @author LiJin (1003680421@qq.com)
         * @date   2024-04-17
         */
        void setConstraintRatio(ConstraintRatio newConstraintRatio);
        /**
         * @brief  获取约束比例值
         * @param[in]  
         * @return 
         * @author LiJin (1003680421@qq.com)
         * @date   2024-04-17
         */
        double getConstraintRatioValue() const;
        /**
         * @brief  设置约束比例值
         * @param[in]  
         * @return 
         * @author LiJin (1003680421@qq.com)
         * @date   2024-04-17
         */
        void setConstraintRatioValue(double newConstraintRatioValue);

    private:
        /**
         * @brief  离散方法
         * @author LiJin (1003680421@qq.com)
         * @date   2024-04-17
         */
        DiscretizationMethod m_discretizationMethod{DiscretizationMethod::AnalysisDefault};
        /**
         * @brief  排除壳单元厚度
         * @author LiJin (1003680421@qq.com)
         * @date   2024-04-17
         */
        bool m_excludeShellThickness{false};
        /**
         * @brief  位置容差类型
         * @author LiJin (1003680421@qq.com)
         * @date   2024-04-17
         */
        PositionTolerance m_postionTol{PositionTolerance::UseComputerDefault};
        /**
         * @brief  位置容差
         * @author LiJin (1003680421@qq.com)
         * @date   2024-04-17
         */
        double m_positionDistance{0.0};
        /**
         * @brief  是否调整从面
         * @author LiJin (1003680421@qq.com)
         * @date   2024-04-17
         */
        bool m_adjustSlave{true};
        /**
         * @brief  是否绑定旋转自由度
         * @author LiJin (1003680421@qq.com)
         * @date   2024-04-17
         */
        bool m_tieRotationDofs{true};
        /**
         * @brief  约束比例类型
         * @author LiJin (1003680421@qq.com)
         * @date   2024-04-17
         */
        ConstraintRatio m_constraintRatio{ConstraintRatio::UseAnalysisDefault};
        /**
         * @brief  约束比例
         * @author LiJin (1003680421@qq.com)
         * @date   2024-04-17
         */
        double m_constraintRatioValue{0.0};
    };
}


#endif // FITKABACONSTRAINTTIE_H
